package com.hoshiicloud.common.constant;



/**
 * 结算方式常量类
 * 1-一次付款  2 分期付款
 *
 * @author: zhangshuhu
 * @descripton: 商品类型枚举
 * @date: 14:37 2019/5/27
 */
public enum SettlementEnum {
    ONE_PAYMENT(1, "一次付款"),
    HIRE_PAYMENT(2, "分期付款");
    private int code;

    private String name;

    SettlementEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    public static SettlementEnum get(int code) {
        for (SettlementEnum aparameterStatus : values()) {
            if (aparameterStatus.getCode() == code) {
                return aparameterStatus;
            }
        }
        return null;
    }

}
